'use strict';
const fs = require('fs');

const Controller = require('egg').Controller;

class HomeController extends Controller {

    async index() {
        await this.ctx.render('index.html')
    }

    async home() {
        this.ctx.set('cache-control', 'no-cache');

        if (this.ctx.helper.isMobile()) {
            console.log('mobile')
            await this.ctx.render('mobile.html')
        } else {
            console.log('pc')
            await this.ctx.render('index.html')
        }
    }
}

module.exports = HomeController;
